package cn.zwx.goods.svc.rpc.dto;

import lombok.Data;
import org.apache.dubbo.apidocs.annotations.RequestParam;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author zhangwenxue
 */
@Data
public class BuilderAttrDTO  implements Serializable {

    /**
     * 规格属性id
     */
    @NotNull(message = "规格属性id不能为空")
    @RequestParam(value = "0",description = "规格属性id",required = true)
    private Long attrId;


    /**
     * 规格属性值id
     */
    @NotNull(message = "规格属性值id不能为空")
    @RequestParam(value = "0",description = "规格属性值id",required = true)
    private Long attrValueId;


    /**
     * 规格属性名称
     */
    @NotBlank(message = "规格属性名称不能为空")
    @Length(max = 32,message = "规格属性名称不能超过32位")
    @RequestParam(value = "0",description = "规格属性名称",required = true)
    private String attrName;

    /**
     * 规格属性值名称
     */
    @NotBlank(message = "规格属性值不能为空")
    @Length(max = 32,message = "规格属性值不能超过32位")
    @RequestParam(value = "0",description = "规格属性值",required = true)
    private String attrValueName;
}
